package com.wyp.myutils;

public class myutils {
    public String delspace(String str) {
        str = str.replace(" ", "");
        String string = "";
        char[] c = str.toCharArray();
        char temp;
        for(int i=0;i<str.length();i++) {
            for (int j = str.length() - 1; j > i; j--) {
                if (c[j] <= c[j - 1]) {
                    temp = c[j];
                    c[j] = c[j - 1];
                    c[j - 1] = temp;
                }
            }
        }
        for (char c1 : c) {
            string += c1;
        }
        return string;
    }
}
